import { onUnmounted } from "vue";
import _ from "lodash";
export default function (chart) {
  let resize = _.throttle(function () {
    chart.resize();
  }, 200);
  window.addEventListener("resize", resize);
  onUnmounted(() => {
    window.removeEventListener("resize", resize);
  });
}
